package org.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.service.impl.IesServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


/**
 * ============================================================<br>
 * <p> ProjectName ：spiderAdapter </p>
 * <p> @author dongjianzhao </p>
 * <p> @date 2023/3/21 </p>
 * <p> @version ：1.0 </p>
 * ============================================================<br>
 * <p>
 * 电管家服务商的数据爬取
 * </p>
 * ============================================================<br>
 */
@Slf4j
@RestController
@RequestMapping("/service")
public class IesServiceController {
    @Autowired
    private IesServiceImpl iesService;
    @RequestMapping(value="/spider",method= RequestMethod.GET)
    public void spider(){
        log.info("/service/spider");
        iesService.spider();
    }
    @RequestMapping(value="/adapter",method= RequestMethod.GET)
    public void adapter(){
        log.info("/service/adapter");
        iesService.adapter();
    }
    @RequestMapping(value="/spiderAndAdapter",method= RequestMethod.GET)
    public void spiderAndAdapter(){
        log.info("/service/spiderAndAdapter");
        iesService.spider();
        iesService.adapter();
    }
}
